﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoVanHocTapData.Interface;
using CoVanHocTapData.Entities;

namespace CoVanHocTapData.Concretes
{
    public class KhoiLopRepository:IKhoiLopRepository
    {
        DangKyPhuEntities entities;
        public KhoiLopRepository()
        {
            entities = new DangKyPhuEntities();
        }
        NganhDaoTaoRepository nganhDaoTaoRepo = new NganhDaoTaoRepository();
        HeDaoTaoRepository heDaoTaoRepo = new HeDaoTaoRepository();
        NienKhoaRepository nienKhoaRepo = new NienKhoaRepository();

        public void KhoiLop(string maSV, out NganhDaoTao nganhDaoTao, out HeDaoTao heDaoTao, out NienKhoa nienKhoa)
        {
            nganhDaoTao = nganhDaoTaoRepo.LayNganhTuMaSV(maSV);
            heDaoTao = heDaoTaoRepo.LayHeDaoTaoTuMaSV(maSV);
            nienKhoa = nienKhoaRepo.LayNienKhoaTuMaSV(maSV);
        }

        public void KhoiLopCN2(string maSV, out NganhDaoTao nganhDaoTao, out HeDaoTao heDaoTao, out NienKhoa nienKhoa)
        {
            nganhDaoTao = nganhDaoTaoRepo.LayNganh2CuaSinhVien(maSV);
            heDaoTao = heDaoTaoRepo.LayHeDaoTaoTuMaSV(maSV);
            nienKhoa = nienKhoaRepo.LayNienKhoaTuMaSV(maSV);
        }
    }
}
